// JavaScript Document
function eval_ajax(params){
    jQuery.ajax({
        type: "POST",
        url:  "index-ajax.php",
        cache: false,
        data: "q=assets/snippets/mvc/ajax.php&"+params,
        success: function(msg){
            eval(msg);
        }
    });
}

function set_field_ok(field){
    jQuery('#field_'+field).removeClass("error");
    jQuery('#field_'+field).addClass("ok");
    jQuery('#error_for_'+field).html("");
}

function set_field_error(field, text){
    jQuery('#field_'+field).removeClass("ok");
    jQuery('#field_'+field).addClass("error");
    jQuery('#error_for_'+field).html(text);
}

